﻿@{
    ViewBag.Title = "SendExpress";
}

@section scripts
{
    <script src="@Url.Content("~/Scripts/shared/share.js")" type="text/javascript"></script> 
    <link href="~/Scripts/miniui/themes/default/medium-mode.css" rel="stylesheet" type="text/css" />      
}

<form id="form1" method="post">
            @Html.Partial("~/Views/Modular/Toolbars.cshtml")
        <div name="Base" title="品牌资料" style="height:100%;overflow:hidden;margin-top:40px;margin-left:100px">
            <table>
                <tr>
                    <td width="80px" height ="50px" align="right">物流公司：</td>
                    <td width="280px" height ="50px">
                        @Html.Partial("~/Views/Modular/LookupLogistical.cshtml")
                    </td>
                </tr>
                <tr>
                    <td width="80px" height ="50px" align="right">物流单号：</td>
                    <td width="280px" height ="50px">
                        <input id="FExpressNumber" name="FExpressNumber" class="mini-textbox " style="width:200px;"  TabIndex="2"/>
                    </td>
                </tr>
            </table>
            <br />
        </div>
    <input name="FItemID" class="mini-hidden" />
</form>

<script>
    mini.parse();
    function FormShown() {
    }

    //加载资料
    function setData(data) {
        if (data.action == "new") {
            mini.getbyName("FItemID").setValue(0);
        }
        else {
            mini.getbyName("FItemID").setValue(data);
        }
    }

    //保存资料
    function SaveInfo() {
        if (mini.getbyName("FLogisticalNumber").getValue() == '') {
            mini.alert("没选择物流");
            mini.getbyName("FLogisticalNumber").focus();
            return;
        }
        if ((mini.getbyName("FExpressNumber").getValue() == '') && (mini.getbyName("FLogistType").getValue() == '1')) {
            mini.alert("物流单号没输入");
            mini.getbyName("FExpressNumber").focus();
            return;
        }
        mini.getbyName("SaveInfo").setEnabled(false);
        var form = new mini.Form("#form1");
        var data = form.getData(true, false);

        var json = mini.encode(data);
        $.post("SaveExpressNumber", { json: json, mSystemAppID: parent.window.getSystemAppID() }, function (data) {
            var ret = mini.decode(data);
            if (ret.status == 1) {
                mini.showTips({ content: ret.msg, state: "success", x: "center", y: "top", timeout: 3000 });
            }
            else {
                mini.alert("异常 : " + ret.error);
            }
            mini.getbyName("SaveInfo").setEnabled(true);
        });
    }


</script>